<!doctype html>
<html>
<head>
    <title>设置</title>
    <?php $this->load->module('admin/index/page_header');?>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/select2/select2.min.js"></script>
    <script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/select2/select2_locale_zh-CN.js"></script>
    <link href="<?php echo URLPRE;?>static/public/Lib/select2/select2.css" rel="stylesheet" />
    <link href="<?php echo URLPRE;?>static/public/Lib/select2/select2-bootstrap.css" rel="stylesheet" />
    <link href="<?php echo URLPRE;?>static/admin/css/font_icon.css" rel="stylesheet" />
</head>
<body>
<div class="wrap">
    <div class="nav">
        <ul>
            <li><a href="<?php echo site_url('weixin/admin/send');?>">群发消息</a></li>
            <li class="current"><a href="javascript:;">新建群发消息</a></li>
        </ul>
    </div>
    <div class="table_full">
        <form class="formvalidate" action="" method="post">
            <div class="h_a">群发消息 - ID:<?PHP echo $list_id?></div>
            <div class="table_full">
                <table width="100%">
                    <col class="th" />
                    <col/>
                    <tbody>
                    <tr>
                        <th>&nbsp;</th>
                        <th><b>标题</b></th>
                        <th><b>描述</b></th>
                        <th><b>内容</b></th>
                        <th><b>缩略图</b></th>
                        <th><b>原文链接</b></th>
                        <th><b>作者</b></th>
                        <th><b>否显示封面</b></th>
                        <th width="70"><b>排序</b></th>
                    </tr>
                    <?php foreach ($list as $row) { ?>
                        <tr>
                            <td class="btn_min">
                                <div class="operat hidden">
                                    <a class="icon-cog action" href="javascript:;">处理</a>
                                    <div class="menu_select">
                                        <ul>
                                            <li><a class="icon-pencil" href="<?php echo site_url('weixin/admin/new_send_add/?list_id='.$row['list_id'].'&id='.$row['id']);?>">编辑</a></li>
                                            <li><a class="icon-remove-2 doDel" href="javascript:;" data-uri="<?php echo site_url('weixin/admin/new_send_delete/?list_id='.$row['list_id'].'&id='.$row['id']);?>">删除</a></li>
                                        </ul>
                                    </div>
                                </div>
                            </td>
                            <td><?php echo $row['title']?></td>
                            <td><?php echo $row['digest']?></td>
                            <td><?php echo $row['content']?></td>
                            <td><img src="<?php echo URLPIC.$row['thumb']?>" height="70" /> </td>
                            <td><?php echo $row['content_source_url']?></td>
                            <td><?php echo $row['author']?></td>
                            <td><?php echo $row['show_cover_pic']? '是' : '否'?></td>
                            <td><?php echo $row['displayorder']?></td>
                        </tr>
                    <?php }?>

                    <tr>
                        <td>&nbsp;</td>
                        <td colspan="8"><a href="<?php echo site_url('weixin/admin/new_send_add/?list_id='.$list_id);?>" class="add">增加一条</a></td>
                    </tr>

                    <tr>
                        <th><b>群发对象</b></th>
                        <td colspan="8">
                            <select style="width:100px" class="supplier" name="row[group_id]">
                                <option value="-1">全部用户</option>
                                <?php foreach ($user_group as $group) {
                                    ?>
                                    <option value="<?php echo $group['id'] ?>" <?php echo $group['id'] == $list_info['group_id'] ? 'selected' : ''?>><?php echo $group['name']?></option>
                                <?php
                                }
                                ?>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th>&nbsp;</th>
                        <td colspan="8">
                            <input type="hidden" name="list_id" value="<?php  echo $list_id?>" />
                            <button type="submit" class="btn btn_submit J_ajax_submit_btn">保存</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    $('.supplier').select2({placeholder: "请选择",allowClear: true});
</script>
</body>
</html>